AUD currency not working in sandbox environment

notaras
Contributor
Contributor

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

 

Login to Me Too
4 REPLIES 4

MTS_Ciaran
Moderator
Moderator

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

 

 

Login to Me Too

PradeepJay
New Community Member

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

Login to Me Too

MTS_Ciaran
Moderator
Moderator

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

Login to Me Too

MTS_Ciaran
Moderator
Moderator

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
   },
}

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.