Search code examples
paypalsandboxcurrency

Paypal sandbox, all my GBP transactions are becoming USD transactions


I'm having a currency problem with Paypal Sandbox.

I'm testing recurring payments for my site using the sandbox (digital goods, express checkout)

Everything is working as expected.

The user clicks on pay.

The user is transfered to paypal express checkout login.

The paypal login screen shows the correct amount in the correct currency e.g. £10

The user logs in (authenticates the transaction)

The payment is successful and the user returns to our site.

Lovely. It all works as I would expect.

However, when I log into the merchant sandbox account to check the activity, all of the £xx payments my test user made are now in $xx (USD)

How can I fix this, or does Sandbox only support USD and this will go away if I go live?

I have tried changing the currency in my request (i.e. setting PAYMENTREQUEST_0_CURRENCYCODE = something else) - that changes the currency in the payment page login, but regardless, all payments still come through as USD in the merchant login.

I have GBP, Euro and USD setup as currencies in my merchant account.

A request looks like this (except all keys are converted to UC before sending the request to PayPal).

      'L_PAYMENTREQUEST_0_AMT0' => '10.00',
      'paymentaction' => 'Sale',
      'PAYMENTREQUEST_0_CURRENCYCODE' => 'GBP',
      'l_billingtype0' => 'RecurringPayments',
      'returnUrl' => 'http://site.com',
      'brandname' => 'Name',
      'L_PAYMENTREQUEST_0_DESC0' => 'GoPro 10',
      'allownote' => 0,
      'l_billingagreementdescription0' => 'goPro 10.',
      'PAYMENTREQUEST_0_ITEMAMT' => '10.00',
      'cancelUrl' => 'http://site.com/payment/cancel/7',
      'PAYFLOWCOLOR' => '518daf',
      'PAYMENTREQUEST_0_AMT' => '10.00',
      'L_PAYMENTREQUEST_0_ITEMCATEGORY0' => 'Digital',
      'HDRIMG' => 'http://site.com/images/logo230x95.png',
      'MAXFAILEDPAYMENTS' => 0,
      'L_PAYMENTREQUEST_0_NAME0' => '10',
      'noshipping' => 1,
      'L_PAYMENTREQUEST_0_NUMBER0' => 'CR7',
      'L_PAYMENTREQUEST_0_QTY0' => 1,

The response form paypay is "Success", however if I perform a GetRecurringPaymentsProfileDetails

Then the result from paypal is in USD. E.g.

'totalbillingcycles' => '0',
'trialamtpaid' => '0.00',
'autobilloutamt' => 'NoAutoBill',
'ack' => 'Success',
'desc' => 'Gift or use 110 points per month and receive 70% revenue share with goPro 10.',
'numcyclesremaining' => '0',
'amt' => '10.00',
'maxfailedpayments' => '0',
'nextbillingdate' => '2012-11-22T10:00:00Z',
'regularbillingperiod' => 'Day',
'aggregateamt' => '0.00',
'subscribername' => 'name',
'regulartotalbillingcycles' => '0',
'billingperiod' => 'Day',
'outstandingbalance' => '0.00',
'status' => 'Active',
'regularamtpaid' => '0.00',
'taxamt' => '0.00',
'regulartaxamt' => '0.00',
'failedpaymentcount' => '0',
'regularshippingamt' => '0.00',
'profileid' => 'I-616GDHNKDXKL',
'timestamp' => '2012-11-22T12:28:26Z',
'regularbillingfrequency' => '1',
'version' => '95.0',
'finalpaymentduedate' => '1970-01-01T00:00:00Z',
'build' => '4181146',
'numcyclescompleted' => '0',
'correlationid' => 'c3fc55a117agh',
'shippingamt' => '0.00',
'regularcurrencycode' => 'USD',
'regularamt' => '10.00',
'aggregateoptionalamt' => '0.00',
'profilestartdate' => '2012-11-22T00:00:00Z',
'billingfrequency' => '1',
'currencycode' => 'USD',

Is there something obvious I'm missing?


Solution

  • Ah, I asked too early, it seems that the field

    PAYMENTREQUEST_0_CURRENCYCODE is ignored (I'm not sure why - it's documented)

    You must use

    CURRENCYCODE = GBP (which is documented as deprecated).