cancel
Showing results for 
Search instead for 
Did you mean: 

AUD currency not working in sandbox environment

Contributor

AUD currency not working in sandbox environment

Hi

 

If i specify to use USD currency in my HTML, the sandbox form works. However, if i switch to AUD, it does not.

 

eg:

<input type="hidden" name="currency_code" value="USD"> works

<input type="hidden" name="currency_code" value="AUD"> does not

 

Any suggestions why it would not work?

 

Thanks

 

4 REPLIES 4
Moderator

Re: AUD currency not working in sandbox environment

Can you post the whole form and the sandbox account details (PM me if you'd prefer) please. 

 

 

New Community Member

Re: AUD currency not working in sandbox environment

Hello, AUD currency is not working for me on sandbox environment eventhough i sign up for paypal/au buisness account. Can you pls help on this. 

 

{
"name": "VALIDATION_ERROR",
"details": [
{
"field": "transactions",
"issue": "Item currency codes should be same as the transaction currency code in all buckets"
}
],
"message": "Invalid request - see details",
"information_link": "https://developer.paypal.com/docs/api/payments/#errors",
"debug_id": "be5698ab803ad"
}

 

Thanks

Pradeep J

Moderator

Re: AUD currency not working in sandbox environment

Hey, Can you post the full API call body you are sending?

Moderator

Re: AUD currency not working in sandbox environment

Actually I got it from the logs, the issue is that you have the currency set in the item list as USD and AUD in the overall amounts, you need to check the USD in the item details to AUD. 

 

{
   "intent":"sale",
   "payer":{
      "payment_method":"paypal",
      "payment_method_type":"PAYPAL",
      "extended_payment_method_type":"PAYPAL"
   },
   "transactions":[
      {
         "amount":{
            "total":"100",
            "currency":"AUD",
            "details":{
               "subtotal":"75",
               "tax":"15",
               "shipping":"10",
            },
         },
         "description":"Transaction description.",
         "invoice_number":"209882",
         "related_resources":[

         ],
         "item_list":{
            "items":[
               {
                  "name":"Item Name",
                  "sku":"sku",
                  "price":"15",
                  "currency":"USD",
                  "quantity":"5",
               }
            ],
         }
      }
   ],
   "redirect_urls":{
      "return_url":"http://localhost/xxxxxxxxxxxxxx.",
      "cancel_url":"http://localhost/xxxxxxxxxxxxxx
   },
}