Комиссия за транзакцию или валюта недействительны в Телре - PullRequest
0 голосов
/ 28 февраля 2020

Я интегрирую платежный шлюз Telr в свое приложение. Там нет надлежащей документации об этом.

Во время запуска своего демонстрационного проекта я показываю «Сумма транзакции или валюта недействительны». Пожалуйста, помогите.

код:

     private MobileRequest getMobileRequest() {

    MobileRequest mobile = new MobileRequest();
    mobile.setStore(STORE_ID);                       // Store ID
    mobile.setKey(KEY);                              // Authentication Key : The Authentication Key will be supplied by Telr as part of the Mobile API setup process after you request that this integration type is enabled for your account. This should not be stored permanently within the App.
    App app = new App();
    app.setId("123456789");                          // Application installation ID
    app.setName("Telr SDK DEMO");                    // Application name
    app.setUser("123456");                           // Application user ID : Your reference for the customer/user that is running the App. This should relate to their account within your systems.
    app.setVersion("0.0.1");                         // Application version
    app.setSdk("123");
    mobile.setApp(app);
    Tran tran = new Tran();
    tran.setTest("1");                              // Test mode : Test mode of zero indicates a live transaction. If this is set to any other value the transaction will be treated as a test.
    tran.setType("auth");                           /* Transaction type
                                                        'auth'   : Seek authorisation from the card issuer for the amount specified. If authorised, the funds will be reserved but will not be debited until such time as a corresponding capture command is made. This is sometimes known as pre-authorisation.
                                                        'sale'   : Immediate purchase request. This has the same effect as would be had by performing an auth transaction followed by a capture transaction for the full amount. No additional capture stage is required.
                                                        'verify' : Confirm that the card details given are valid. No funds are reserved or taken from the card.
                                                    */
    tran.setClazz("paypage");                       // Transaction class only 'paypage' is allowed on mobile, which means 'use the hosted payment page to capture and process the card details'
    tran.setCartid(String.valueOf(new BigInteger(128, new Random()))); //// Transaction cart ID : An example use of the cart ID field would be your own transaction or order reference.
    tran.setDescription("Test Mobile API");         // Transaction description
    tran.setCurrency("AED");                        // Transaction currency : Currency must be sent as a 3 character ISO code. A list of currency codes can be found at the end of this document. For voids or refunds, this must match the currency of the original transaction.
    tran.setAmount("1");                         // Transaction amount : The transaction amount must be sent in major units, for example 9 dollars 50 cents must be sent as 9.50 not 950. There must be no currency symbol, and no thousands separators. Thedecimal part must be separated using a dot.
    //tran.setRef(???);                           // (Optinal) Previous transaction reference : The previous transaction reference is required for any continuous authority transaction. It must contain the reference that was supplied in the response for the original transaction.
    tran.setLangauge("en");                        // (Optinal) default is en -> English
    mobile.setTran(tran);
    Billing billing = new Billing();
    Address address = new Address();
    address.setCity("Dubai");                       // City : the minimum required details for a transaction to be processed
    address.setCountry("AE");                       // Country : Country must be sent as a 2 character ISO code. A list of country codes can be found at the end of this document. the minimum required details for a transaction to be processed
    address.setRegion("Dubai");                     // Region
    address.setLine1("SIT G=Towe");                 // Street address – line 1: the minimum required details for a transaction to be processed
    //address.setLine2("SIT G=Towe");               // (Optinal)
    //address.setLine3("SIT G=Towe");               // (Optinal)
    //address.setZip("SIT G=Towe");                 // (Optinal)
    billing.setAddress(address);
    Name name = new Name();
    name.setFirst("Hany");                          // Forename : the minimum required details for a transaction to be processed
    name.setLast("Sakr");                          // Surname : the minimum required details for a transaction to be processed
    name.setTitle("Mr");                           // Title
    billing.setName(name);
    billing.setEmail(EMAIL);                 // TODO: Insert your email here : the minimum required details for a transaction to be processed.
    billing.setPhone("588519952");                // Phone number, required if enabled in your merchant dashboard.
    mobile.setBilling(billing);
    return mobile;
}

1 Ответ

0 голосов
/ 18 марта 2020

попробуйте изменить валюту, потому что AED не поддерживается tran.setCurrency ("SAR");

...