-
Notifications
You must be signed in to change notification settings - Fork 200
CreateRecurringPaymentsProfile example not working on production #105
Comments
Yes, please submit a pull request so it can be reviewed. |
I just got an answer from PayPal support few days ago. I will provide a pull request as soon as I can. |
Hi, |
@Mahesh-xpertech can you provide the error response? Ensure you provide the correlation id from the response as well please. |
Ack : PayPal\PayPalAPI\CreateRecurringPaymentsProfileResponseType Object
) |
@pp-randy
"; print_r($createRPProfileResponse); echo ""; ``` } require_once '../Response.php'; |
@Mahesh-xpertech can you try now please? |
@pp-randy Now this code return ack is success but transaction is not showing in the sandbox transaction list. |
@pp-randy My response is below from paypal PayPal\PayPalAPI\CreateRecurringPaymentsProfileResponseType Object
) |
I reviewed the transaction and it is associated to your sandbox test account. You would need to log into the sandbox test account at https://www.sandbox.paypal.com. I apologize for the confusion to provide more details the the Sandbox Transactions listed here: https://developer.paypal.com/developer/dashboard/sandbox/, these are for the REST API and the SDK for that is here: https://github.com/paypal/PayPal-PHP-SDK The above it my assumption of what you might be experiencing. If this is the case please provide more details around where the transaction is missing and I help further. |
@pp-randy I am using direct payment of sample code but transaction is not showing in the transaction sandbox.. sir Plz help me with any problem with following Code Name = "$firstName $lastName"; $address->Street1 = $_POST['address1']; $address->Street2 = $_POST['address2']; $address->CityName = $_POST['city']; $address->StateOrProvince = $_POST['state']; $address->PostalCode = $_POST['zip']; $address->Country = $_POST['country']; $address->Phone = $_POST['phone']; $paymentDetails = new PaymentDetailsType(); $paymentDetails->ShipToAddress = $address; /* - Total cost of the transaction to the buyer. If shipping cost and tax charges are known, include them in this value. If not, this value should be the current sub-total of the order. If the transaction includes one or more one-time purchases, this field must be equal to the sum of the purchases. Set this field to 0 if the transaction does not include a one-time purchase such as when you set up a billing agreement for a recurring payment that is not immediately charged. When the field is set to 0, purchase-specific fields are ignored. - `Currency Code` - You must set the currencyID attribute to one of the 3-character currency codes for any of the supported PayPal currencies. - `Amount` _/ $paymentDetails->OrderTotal = new BasicAmountType('USD', $_POST['amount']); /_ - Your URL for receiving Instant Payment Notification (IPN) about this transaction. If you do not specify this value in the request, the notification URL from your Merchant Profile is used, if one exists. */ if(isset($_REQUEST['notifyURL'])) { $paymentDetails->NotifyURL = $_REQUEST['notifyURL']; } $personName = new PersonNameType(); $personName->FirstName = $firstName; $personName->LastName = $lastName; //information about the payer $payer = new PayerInfoType(); $payer->PayerName = $personName; $payer->Address = $address; $payer->PayerCountry = $_POST['country']; $cardDetails = new CreditCardDetailsType(); $cardDetails->CreditCardNumber = $_POST['creditCardNumber']; /* * Type of credit card. For UK, only Maestro, MasterCard, Discover, and Visa are allowable. For Canada, only MasterCard and Visa are allowable and Interac debit cards are not supported. It is one of the following values: - Visa - MasterCard - Discover - Amex - Solo - Switch - Maestro: See note. `Note: If the credit card type is Maestro, you must set currencyId to GBP. In addition, you must specify either StartMonth and StartYear or IssueNumber.` */ $cardDetails->CreditCardType = $_POST['creditCardType']; $cardDetails->ExpMonth = $_POST['expDateMonth']; $cardDetails->ExpYear = $_POST['expDateYear']; $cardDetails->CVV2 = $_POST['cvv2Number']; $cardDetails->CardOwner = $payer; $ddReqDetails = new DoDirectPaymentRequestDetailsType(); $ddReqDetails->CreditCard = $cardDetails; $ddReqDetails->PaymentDetails = $paymentDetails; $ddReqDetails->PaymentAction = $_REQUEST['paymentType']; $doDirectPaymentReq = new DoDirectPaymentReq(); $doDirectPaymentReq->DoDirectPaymentRequest = new DoDirectPaymentRequestType($ddReqDetails); /* - ## Creating service wrapper object Creating service wrapper object to make API call and loading Configuration::getAcctAndConfig() returns array that contains credential and config parameters _/ $paypalService = new PayPalAPIInterfaceServiceService(Configuration::getAcctAndConfig()); try { /_ wrap API method calls on the service object with a try catch */ $doDirectPaymentResponse = $paypalService->DoDirectPayment($doDirectPaymentReq); } catch (Exception $ex) { include_once("../Error.php"); exit; } if(isset($doDirectPaymentResponse)) { echo ""; echo ""; echo ""; echo "
"; print_r($doDirectPaymentResponse); echo ""; } require_once '../Response.php'; ?> |
Which URL are you not seeing the transaction on? I can see them on your sandbox account. Example: You recently created 63W45731FD302724U for $10.00. |
@pp-randy |
@pp-randy |
Your transactions will not show in that URL because they are not created with the REST API. Please review this previous comment.
From here: #105 (comment) |
If you do not know the password for your merchant sandbox account to log into https://www.sandbox.paypal.com you can change it here: https://developer.paypal.com/developer/accounts/ and then click the Profile link for that account. |
Hi,
I had some issues to implement CreateRecurringPaymentsProfile in production because the example for sandbox is incomplete, mandatory fileds for the credit card were missing. Do you accept a pull request containing the update?
The text was updated successfully, but these errors were encountered: