Creation of billing agreement can not be confirmed by customer Payum/paypal-express-checkout-nvp -
i trying create recurring profile using express-checkout (payum/paypal-express-checkout-nvp).
howto payum
private function createagreement(purchase $purchase) { $storage = $this->payum->getstorage('coachup\paymentbundle\entity\paymentagreement'); $agreementdetails = $storage->createmodel(); $agreementdetails['l_billingtype0'] = api::billingtype_recurring_payments; $agreementdetails['l_billingagreementdescription0'] = 'test'; $agreementdetails['paymentrequest_0_amt'] = 0; $agreementdetails->setpurchase($purchase); $storage->updatemodel($agreementdetails); $capturetoken = $this->securitytokenfactory->createcapturetoken( $this->paymentname, $agreementdetails, 'payment_checkout_progress_payment', ['purchaseid' => $purchase->getid(), 'paymenttype' => $this->getid()] ); $agreementdetails['returnurl'] = $capturetoken->gettargeturl(); $agreementdetails['cancelurl'] = $capturetoken->gettargeturl(); $storage->updatemodel($agreementdetails); homecoming $capturetoken->gettargeturl(); }
a token seems generated paypal, user gets redirected paypal (sandbox) , 1 time log in confirm agreement, generic error message (loosely translated) "the request can not processed, please homecoming store , take option". not error code...
any help?
its possible initial payment of 0.00 failing, making billing understanding not created. here way can override , create profile anyway. comes straight paypal documentation:
by default, paypal not activate profile if initial payment amount fails. override default behavior, set failedinitamtaction
field continueonfailure
. if initial payment amount fails, continueonfailure
instructs paypal add together failed payment amount outstanding balance due on recurring payment profile.
if not set failedinitamtaction
or set cancelonfailure
, paypal creates recurring payment profile. however, paypal places profile pending status until initial payment completes. if initial payment clears, paypal notifies instant payment notification (ipn) has activated pending profile. if payment fails, paypal notifies ipn has canceled pending profile.
if created profile using express checkout, buyer receives email stating paypal cleared initial payment or canceled pending profile.
here direct link in case need it:
recurring billing integration guide
paypal express-checkout recurring payum
No comments:
Post a Comment