Capture status after making a stripe api charge - php

I am looking for the php code syntax to capture if the call was successful or failed to stripe API. I need to capture one of the objects property to determine this but I am not sure what the best approach is.
Here's a sample response from a successful ACH api charge. I am looking for the php code syntax to capture if call was successful or failed
Stripe\Charge Object
(
[id] => py_1EFlRJBuwnzOEo57Poikh194
[object] => charge
[amount] => 50
[amount_refunded] => 0
[application] =>
[application_fee] =>
[application_fee_amount] =>
[balance_transaction] => txn_1EFlRJBuwnzOEo57dupt8SWp
[captured] => 1
[created] => 1553015365
[currency] => usd
[customer] => cus_Ec6cAdg6N2yYcF
[description] =>
[destination] =>
[dispute] =>
[failure_code] =>
[failure_message] =>
[fraud_details] => Array
(
)
[invoice] =>
[livemode] =>
[metadata] => Stripe\StripeObject Object
(
)
[on_behalf_of] =>
[order] =>
[outcome] => Stripe\StripeObject Object
(
[network_status] => approved_by_network
[reason] =>
[risk_level] => not_assessed
[seller_message] => Payment complete.
[type] => authorized
)
[paid] =>
[payment_intent] =>
[receipt_email] =>
[receipt_number] =>
[receipt_url] => https://pay.stripe.com/receipts/acct_1E8sOiBuwnzOEo57/py_1EFlRJBuwnzOEo57Poikh194/rcpt_EjDtGP7iknHI9RCBJ3iUODNC6bVBVyM
[refunded] =>
[refunds] => Stripe\Collection Object
(
[object] => list
[data] => Array
(
)
[has_more] =>
[total_count] => 0
[url] => /v1/charges/py_1EFlRJBuwnzOEo57Poikh194/refunds
)
[review] =>
[shipping] =>
[source] => Stripe\BankAccount Object
(
[id] => ba_1E8sTZBuwnzOEo57MKqXEvb7
[object] => bank_account
[account_holder_name] => Rassi Stern
[account_holder_type] => individual
[bank_name] => STRIPE TEST BANK
[country] => US
[currency] => usd
[customer] => cus_Ec6cAdg6N2yYcF
[fingerprint] => 9l7up0pswCYSO7eu
[last4] => 6789
[metadata] => Stripe\StripeObject Object
(
)
[routing_number] => 110000000
[status] => verified
)
[source_transfer] =>
[statement_descriptor] =>
[status] => pending
[transfer_data] =>
[transfer_group] =>
)

Are you using the Stripe PHP library?
I implemented something like this:
try {
$charge = \Stripe\Charge::create(array(
"amount" => $amount, // in pence - min 30p
"currency" => $currency,
"description" => $description,
"statement_descriptor" => $statementDescriptor,
"source" => $token,
"metadata" => array (
'code' => $code
),
"receipt_email" => $email
));
$success = true;
} catch(\Stripe\Error\Card $e) {
$success = false;
// Some other stuff to capture the reason for failure and tell the user etc.
}
If you're not using their library, it's probably worth investigating it: there are a lot of varying reasons why a payment could succeed or fail, so looking through that massive Charge Object for the answer may not 100% yield the results you want.

You can fetch the value of the "paid" OR "status" parameters from the charge object.
$success = json_encode($charge->paid); // Expected value = true
$success = json_encode($charge->status); // Expected value = succeeded
Then you can do your check:
if($success) { // or $success == "succeeded" depending on which array key you go for.
// Payment succeeded! Do something...
} else {
print_r(json_encode($charge->failure_message));
// Do something else...
}
The code may also work without json_encode(), I've found that my code is less buggy by using json_encode.
This is as per the Stripe API Docs: https://stripe.com/docs/api/charges/create

Related

Get invoice data with Xero API - Private App

I am trying to build an online form that a user can enter their invoice number, the webserver will then interface with the Xero API to GET the invoice details and populate some additional fields for payment.
I have already got the form logic built and in place however I have no clue of how to start with the Xero API.
I've created a private app and have the required keys but I cannot find any documentation on how to actually go about setting up the API call in PHP.
Any help would be much appreciated.
**** UPDATE ****
I was able to get the API working using the following:
function GetInvData ($InvNumber) {
try {
$config = [
'oauth' => [
'consumer_key' => 'REDACTED',
'rsa_private_key' => 'REDACTED',
],
];
$xero = new PrivateApplication($config);
//$invoice = $xero->load(\XeroPHP\Models\Accounting\Invoice::class)->where('InvoiceNumber',$InvNumber)->execute();
$invoice = $xero->load('Accounting\Invoice')
->where('InvoiceNumber',$InvNumber)
->execute();
}
catch(\Exception $ex) {
var_dump($ex);
}
return ($invoice);
}
However what is returned is the most complex piece of JSON I have ever laid eyes on.... Probably not saying much.
All I need to be able to extract is the the Invoice Amount, The Customer name and Their email address, can anybody assist with this?
XeroPHP\Remote\Collection Object
(
[_associated_objects:protected] =>
[storage:ArrayObject:private] => Array
(
[0] => XeroPHP\Models\Accounting\Invoice Object
(
[_data:protected] => Array
(
[Type] => ACCREC
[Contact] => XeroPHP\Models\Accounting\Contact Object
(
[_data:protected] => Array
(
[ContactID] => cf6eef48-cda3-4862-8518-4d631ea54c1c
[ContactNumber] =>
[AccountNumber] =>
[ContactStatus] =>
[Name] => REDACTED
[FirstName] =>
[LastName] =>
[EmailAddress] =>
[SkypeUserName] =>
[ContactPersons] =>
[BankAccountDetails] =>
[TaxNumber] =>
[AccountsReceivableTaxType] =>
[AccountsPayableTaxType] =>
[Addresses] =>
[Phones] =>
[IsSupplier] =>
[IsCustomer] =>
[DefaultCurrency] =>
[XeroNetworkKey] =>
[SalesDefaultAccountCode] =>
[PurchasesDefaultAccountCode] =>
[SalesTrackingCategories] =>
[PurchasesTrackingCategories] =>
[TrackingCategoryName] =>
[TrackingCategoryOption] =>
[PaymentTerms] =>
[UpdatedDateUTC] =>
[ContactGroups] =>
[Website] =>
[BrandingTheme] =>
[BatchPayments] =>
[Discount] =>
[Balances] =>
[HasAttachments] =>
)
[_dirty:protected] => Array
(
)
[_associated_objects:protected] => Array
(
[Contact] => XeroPHP\Models\Accounting\Invoice Object
*RECURSION*
)
[_application:protected] =>
)
[LineItems] =>
[Date] => DateTime Object
(
[date] => 2019-03-05 00:00:00.000000
[timezone_type] => 3
[timezone] => Australia/Melbourne
)
[DueDate] => DateTime Object
(
[date] => 2019-03-12 00:00:00.000000
[timezone_type] => 3
[timezone] => Australia/Melbourne
)
[LineAmountTypes] => Exclusive
[InvoiceNumber] => Inv-1521
[Reference] => Feb 2019
[BrandingThemeID] => c560d364-0331-4677-a529-8ce702559165
[Url] =>
[CurrencyCode] => AUD
[CurrencyRate] => 1
[Status] => AUTHORISED
[SentToContact] => 1
[ExpectedPaymentDate] =>
[PlannedPaymentDate] =>
[SubTotal] => 2150
[TotalTax] => 215
[Total] => 2365
[TotalDiscount] =>
[InvoiceID] => f5cfaed4-db9b-41f3-94e5-a025c2bc898a
[HasAttachments] =>
[Payments] =>
[Prepayments] =>
[Overpayments] =>
[AmountDue] => 2365
[AmountPaid] => 0
[FullyPaidOnDate] =>
[AmountCredited] => 0
[UpdatedDateUTC] => DateTime Object
(
[date] => 2019-03-05 00:32:01.813000
[timezone_type] => 3
[timezone] => UTC
)
[CreditNotes] =>
)
[_dirty:protected] => Array
(
)
[_associated_objects:protected] => Array
(
)
[_application:protected] => XeroPHP\Application\PrivateApplication Object
(
[config:protected] => Array
(
[xero] => Array
(
[site] => https://api.xero.com
[base_url] => https://api.xero.com
[core_version] => 2.0
[payroll_version] => 1.0
[file_version] => 1.0
[model_namespace] => \XeroPHP\Models
)
[oauth] => Array
(
[signature_method] => RSA-SHA1
[signature_location] => header
[authorize_url] => https://api.xero.com/oauth/Authorize
[request_token_path] => oauth/RequestToken
[access_token_path] => oauth/AccessToken
[consumer_key] => REDACTED
[rsa_private_key] => REDACTED
[token] => REDACTED
)
[curl] => Array
(
[10018] => XeroPHP
[78] => 30
[13] => 20
[64] => 2
[81] => 2
[52] =>
[10004] =>
[10006] =>
[10102] =>
)
)
[oauth_client:protected] => XeroPHP\Remote\OAuth\Client Object
(
[config:XeroPHP\Remote\OAuth\Client:private] => Array
(
[signature_method] => RSA-SHA1
[signature_location] => header
[authorize_url] => https://api.xero.com/oauth/Authorize
[request_token_path] => oauth/RequestToken
[access_token_path] => oauth/AccessToken
[consumer_key] => REDACTED
[rsa_private_key] => REDACTED
[token] => REDACTED
)
[token_secret:XeroPHP\Remote\OAuth\Client:private] =>
[verifier:XeroPHP\Remote\OAuth\Client:private] =>
)
)
)
)
)
You're pretty much asking how to do the whole thing which people don't take kindly to here. Good job getting the API call done, it might take a while before you completely understand what goes on with each line but it's not required.
Now that you've got that part done you just need to work with the data that Xero gives you back, well rather what xero-php (which is the library you're using) gives you back. What you've posted is not JSON, it's just a dump (text representation) of the data as it exists as an object in your code.
That object is a Collection of Invoices, but it's just a singular invoice in your case. It will always return a Collection even if you have really specific search queries, but you can always make yourself a little check to make sure the Collection only has one invoice if you're only expecting one.
So, for what you actually want (Invoice Amount, The Customer name and Their email address), here's the next lines of code.
Invoice Amount:
$invoice->Invoices[0]->Total;
Customer Name:
$invoice->Invoices[0]->Contact->Name;
Email Address:
$invoice->Invoices[0]->Contact->EmailAddress;
Invoices[0] is used to grab the first Invoice in the Collection, so it assumes there's only one. Hopefully that points you in the right direction.
Ended up Getting it working with the following:
function GetInvData ($InvNumber) {
global $xero;
$return = array('AmountDue' => null, 'Customer' => null, 'EmailAddress' => null);
try {
//throw new Exception("Test");
$invoices = $xero->load(Accounting\Invoice::class)
->where('InvoiceNumber',$InvNumber)
->where('Status', 'AUTHORISED')
->execute();
$invoice = $invoices->first();
if(empty($invoice)){
$return = '';
}
else {
$invoiceCount = count($invoice);
if($invoiceCount > 1) {
throw new \Exception("Managed to find [" . $invoiceCount . "] with Invoice ID [" . $InvNumber . "]. Expected this to be unique.");
}
$contact = $invoice->getContact();
$return['AmountDue'] = $invoice->getAmountDue();
$return['Customer'] = $contact->getName();
$return['EmailAddress'] = $contact->getEmailAddress();
}
}
catch(\Exception $ex) {
$return = LogException($ex);
}
return $return;
}
Thanks everyone for the assistance.

How to get transaction ID from response in Square Payment

I am very new in square payment.
I get response below. Now I need transaction ID from this response.
What's the best way to get it from this response?
---->Array
(
[*errors] =>
[*transaction] => SquareConnect\Model\Transaction Object
(
[id:protected] => 14bad261-60a6-56d7-6422-3ec8b7cdd10e
[location_id:protected] => CBASEGb8XMvdzZkrjf0H3PiMRi8gAQ
[created_at:protected] => 2018-03-12T10:23:33Z
[tenders:protected] => Array
(
[0] => SquareConnect\Model\Tender Object
(
[id:protected] => 7924ab32-9544-5139-673e-8ff5d0767858
[location_id:protected] => CBASEGb8XMvdzZkrjf0H3PiMRi8gAQ
[transaction_id:protected] => 14bad261-60a6-56d7-6422-3ec8b7cdd10e
[created_at:protected] => 2018-03-12T10:23:33Z
[note:protected] => Online Transaction
[amount_money:protected] => SquareConnect\Model\Money Object
(
[amount:protected] => 100
[currency:protected] => USD
)
[tip_money:protected] =>
[processing_fee_money:protected] =>
[customer_id:protected] =>
[type:protected] => CARD
[card_details:protected] => SquareConnect\Model\TenderCardDetails Object
(
[status:protected] => CAPTURED
[card:protected] => SquareConnect\Model\Card Object
(
[id:protected] =>
[card_brand:protected] => VISA
[last_4:protected] => 1111
[exp_month:protected] =>
[exp_year:protected] =>
[cardholder_name:protected] =>
[billing_address:protected] =>
[fingerprint:protected] => 9334946c94d2a20de8b1e267cc221a23298daed43b44621b4f44a0d032f0fc88
)
[entry_method:protected] => KEYED
)
[cash_details:protected] =>
[additional_recipients:protected] =>
)
)
$result->getTransaction()->getId();

How to get individual values from ups api address validation response through rocketshipit in php

I have a response for ups address validation request as follows:
Array ( [meta] => Array ( [code] => 200 [error_message] => ) [data] => Array ( [city] => [errors] => Array ( [0] => Array ( [code] => [type] => [description] => The state is not supported in the Customer Integration Environment. ) ) [name] => [city_state_zip_match] => [residential] => [po_box] => [suggestions] => [zipcode] => [state] => [addr2] => [addr3] => [addr1] => [zipcode_addon] => [country] => [checks] => [match] => ) )
in PHP, how I do I get individual values like..
code and error_message name, residential, po_box, sate etc.
Thanks in advance
With an array like this
$arr = Array([meta] => Array ( [code] => 200 [error_message] => ));
This is equivalent to
$arr = ["meta" => ["code" => 200, "error_message" => ""]];
So to access the code we would do
$code = $arr["meta"]["code"];
Thank you.
It is working fine with the following code.
$json = <response from ups through rocketship.it>
print_r($json['meta']['code']);
print_r($json['meta']['error_message']);
print_r($json['data']['name']);
print_r($json['data']['po_box']);
print_r($json['data']['errors'][0]['description']);
if ($json['data']['po_box']){
echo "PO BOX: Yes";
}else{
echo "PO BOX: No";
}

what is the success response after a transaction with square up php process payment

i am recieveing this response after a transaction but i am not able to find the success or failure response,also i am not aware of the flow please correct me if i am wrong,
we have a sandbox account on square up we have an ecommerce web.
store with buy now option after submitting the form with nounce and
correction location id we are moved to process payments file where.
it displays the response after a transaction is made.
Response
SquareConnect\Model\ChargeResponse Object
(
[errors:protected] =>
[transaction:protected] => SquareConnect\Model\Transaction Object
(
[id:protected] => 1d034209-12cf-5d13-72f4-62247bb49132
[location_id:protected] => CBASEB5G76QcIpEWB0w38Mi2vWUgAQ
[created_at:protected] => 2017-07-27T05:45:34Z
[tenders:protected] => Array
(
[0] => SquareConnect\Model\Tender Object
(
[id:protected] => 675e208b-caf3-5f11-7482-1eacff13da64
[location_id:protected] => CBASEB5G76QcIpEWB0w38Mi2vWUgAQ
[transaction_id:protected] => 1d034209-12cf-5d13-72f4-62247bb49132
[created_at:protected] => 2017-07-27T05:45:34Z
[note:protected] => Online Transaction
[amount_money:protected] => SquareConnect\Model\Money Object
(
[amount:protected] => 100
[currency:protected] => USD
)
[processing_fee_money:protected] =>
[customer_id:protected] =>
[type:protected] => CARD
[card_details:protected] => SquareConnect\Model\TenderCardDetails Object
(
[status:protected] => CAPTURED
[card:protected] => SquareConnect\Model\Card Object
(
[id:protected] =>
[card_brand:protected] => DISCOVER
[last_4:protected] => 9697
[exp_month:protected] =>
[exp_year:protected] =>
[cardholder_name:protected] =>
[billing_address:protected] =>
[fingerprint:protected] =>
)
[entry_method:protected] => KEYED
)
[cash_details:protected] =>
)
)
[refunds:protected] =>
[reference_id:protected] =>
[product:protected] => EXTERNAL_API
[client_id:protected] =>
[order:protected] =>
[shipping_address:protected] =>
)
)
If you get a transaction back, then your request was successful. If you get errors back, your request was not successful.
you ll get Transaction id return to the Redirect URL

PayPal Adaptive Payments refund Issue

I'm trying to refund an adaptive payment chained payment totally to the sender, but I'm stuck. I'm using CodeIgniter and Andrew Angell's awesome library for adaptive payments.
The refund I want to make has details like this: (you can see the raw xml requests and responds below)
Array
(
[Errors] => Array
(
)
[Ack] => Success
[Build] => 5472483
[CorrelationID] => 4d31bf900a109
[Timestamp] => 2013-03-20T09:45:02.585-07:00
[ActionType] => PAY_PRIMARY
[CancelURL] => http://my-cancel-url.com
[CurrencyCode] => TRY
[FeesPayer] => PRIMARYRECEIVER
[FundingTypes] => Array
(
)
[IPNNotificationURL] =>
[Memo] =>
[PayKey] => my-paykey
[PaymentInfo] => Array
(
[PendingRefund] => false
[RefundAmount] => 0.00
[SenderTransactionID] =>
[SenderTransactionStatus] => COMPLETED
[TransactionID] => my-transaction-id
[TransactionStatus] => COMPLETED
)
[PreapprovalKey] =>
[ReturnURL] => http://success-url-area.com
[ReverseAllParallelPaymentsOnError] => false
[SenderEmail] => sender#email.com
[Status] => INCOMPLETE
[TrackingID] =>
[Receiver] => Array
(
[Amount] => 5.00
[Email] => receiver#email.com
[InvoiceID] =>
[PaymentType] => SERVICE
[Primary] => true
)
[XMLRequest] => <?xml version="1.0" encoding="utf-8"?><PaymentDetailsRequest xmlns="http://svcs.paypal.com/types/ap"><requestEnvelope xmlns=""><detailLevel>ReturnAll</detailLevel><errorLanguage>en_US</errorLanguage></requestEnvelope><payKey xmlns="">my-paykey</payKey></PaymentDetailsRequest>
[XMLResponse] => <?xml version='1.0' encoding='UTF-8'?><ns2:PaymentDetailsResponse xmlns:ns2="http://svcs.paypal.com/types/ap"><responseEnvelope><timestamp>2013-03-20T09:45:02.585-07:00</timestamp><ack>Success</ack><correlationId>4d31bf900a109</correlationId><build>5472483</build></responseEnvelope><cancelUrl>http://my-cancel-url.com</cancelUrl><currencyCode>TRY</currencyCode><paymentInfoList><paymentInfo><transactionId>my-transaction-id</transactionId><transactionStatus>COMPLETED</transactionStatus><receiver><amount>5.00</amount><email>receiver#email.com</email><primary>true</primary><paymentType>SERVICE</paymentType><accountId>7VYWTSCQKWPAL</accountId></receiver><refundedAmount>0.00</refundedAmount><pendingRefund>false</pendingRefund><senderTransactionId>7P642947V2872150G</senderTransactionId><senderTransactionStatus>COMPLETED</senderTransactionStatus></paymentInfo><paymentInfo><receiver><amount>4.60</amount><email>soulsmasher#gmail.com</email><primary>false</primary><paymentType>SERVICE</paymentType><accountId>7UZSWUVKCU4UW</accountId></receiver><refundedAmount>0.00</refundedAmount><pendingRefund>false</pendingRefund></paymentInfo></paymentInfoList><returnUrl>http://success-url-area.com</returnUrl><senderEmail>sender#email.com</senderEmail><status>INCOMPLETE</status><payKey>my-paykey</payKey><actionType>PAY_PRIMARY</actionType><feesPayer>PRIMARYRECEIVER</feesPayer><reverseAllParallelPaymentsOnError>false</reverseAllParallelPaymentsOnError><sender><email>sender#email.com</email><accountId>Y2BSLXZ8DQYY2</accountId><useCredentials>false</useCredentials></sender></ns2:PaymentDetailsResponse>
)
When I try to execute refund, providing paykey, transaction ID (which I got from the request above), and sender email (which will get refund) this error comes up (you can see the raw request and responses below):
Array
(
[Errors] => Array
(
[0] => Array
(
[Receiver] =>
[Category] => Application
[Domain] => PLATFORM
[ErrorID] => 589061
[ExceptionID] =>
[Message] => The receiver sender#email.com is invalid for this refund
[Parameter] => sender#email.com
[Severity] => Error
[Subdomain] => Application
)
)
[Ack] => Failure
[Build] => 5472483
[CorrelationID] => 2a1630b772ee0
[Timestamp] => 2013-03-20T09:52:10.986-07:00
[EncryptedTransactionID] =>
[RefundFeeAmount] =>
[RefundGrossAmount] =>
[RefundHasBecomeFull] =>
[RefundNetAmount] =>
[RefundStatus] =>
[RefundTransactionStatus] =>
[TotalOfAllRefunds] =>
[Receiver] => Array
(
[Amount] =>
[Email] =>
[InvoiceID] =>
[PaymentType] =>
[Primary] =>
)
[RawRequest] => <?xml version="1.0" encoding="utf-8"?><RefundRequest xmlns="http://svcs.paypal.com/types/ap"><requestEnvelope xmlns=""><detailLevel>ReturnAll</detailLevel><errorLanguage>en_US</errorLanguage></requestEnvelope><currencyCode>TRY</currencyCode><payKey xmlns="">my-paykey</payKey><receiverList xmlns=""><receiver xmlns=""><amount xmlns="">1.00</amount><email xmlns="">sender#email.com</email><paymentType xmlns="">SERVICE</paymentType></receiver></receiverList><transactionId xmlns="">1VL98806A27476639</transactionId></RefundRequest>
[RawResponse] => <?xml version='1.0' encoding='UTF-8'?><ns3:FaultMessage xmlns:ns3="http://svcs.paypal.com/types/common" xmlns:ns2="http://svcs.paypal.com/types/ap"><responseEnvelope><timestamp>2013-03-20T09:52:10.986-07:00</timestamp><ack>Failure</ack><correlationId>2a1630b772ee0</correlationId><build>5472483</build></responseEnvelope><error><errorId>589061</errorId><domain>PLATFORM</domain><subdomain>Application</subdomain><severity>Error</severity><category>Application</category><message>The receiver sender#email.com is invalid for this refund</message><parameter>sender#email.com</parameter></error></ns3:FaultMessage>
)
1
Also when I don't provide transaction ID and leave the rest to PayPal, the issue changes to this (raw XML request are below the array):
Array
(
[Errors] => Array
(
[0] => Array
(
[Receiver] =>
[Category] => Application
[Domain] => PLATFORM
[ErrorID] => 589036
[ExceptionID] =>
[Message] => The currency code is missing or doesn't match the code in the payment request
[Parameter] =>
[Severity] => Error
[Subdomain] => Application
)
)
[Ack] => Failure
[Build] => 5472483
[CorrelationID] => e3fc5e41040f3
[Timestamp] => 2013-03-20T10:02:29.233-07:00
[EncryptedTransactionID] =>
[RefundFeeAmount] =>
[RefundGrossAmount] =>
[RefundHasBecomeFull] =>
[RefundNetAmount] =>
[RefundStatus] =>
[RefundTransactionStatus] =>
[TotalOfAllRefunds] =>
[Receiver] => Array
(
[Amount] =>
[Email] =>
[InvoiceID] =>
[PaymentType] =>
[Primary] =>
)
[RawRequest] => <?xml version="1.0" encoding="utf-8"?><RefundRequest xmlns="http://svcs.paypal.com/types/ap"><requestEnvelope xmlns=""><detailLevel>ReturnAll</detailLevel><errorLanguage>en_US</errorLanguage></requestEnvelope><currencyCode>TRY</currencyCode><payKey xmlns="">AP-52A99028X8685964M</payKey><receiverList xmlns=""><receiver xmlns=""><amount xmlns="">1.00</amount><email xmlns="">sender#email.com</email><paymentType xmlns="">SERVICE</paymentType></receiver></receiverList></RefundRequest>
[RawResponse] => <?xml version='1.0' encoding='UTF-8'?><ns3:FaultMessage xmlns:ns3="http://svcs.paypal.com/types/common" xmlns:ns2="http://svcs.paypal.com/types/ap"><responseEnvelope><timestamp>2013-03-20T10:02:29.233-07:00</timestamp><ack>Failure</ack><correlationId>e3fc5e41040f3</correlationId><build>5472483</build></responseEnvelope><error><errorId>589036</errorId><domain>PLATFORM</domain><subdomain>Application</subdomain><severity>Error</severity><category>Application</category><message>The currency code is missing or doesn't match the code in the payment request</message></error></ns3:FaultMessage>
)
1
As you can see, I've already provided the CurrencyCode, also the sender's email adress is taken from the request itself to prevent typos. Even if I hardcode it doesn't change the situation.
Can you help me, what am I missing?
Thanks,
check the documentation say by paypal here
Turkish Lira TRY
NOTE:This currency is supported as a payment currency and a currency balance for in-country PayPal accounts only.

Categories