1

I try to integrate Paypal Plus. Everything works fine now (well, almost everything :) )

  1. Create Payment
  2. Render the Paypal Plus Iframe
  3. Click an external Button to redirect the User to the Paypal hosted Pages
  4. Display the Review-Page
  5. Execute Payment und display the Thank You-Page

Following the Paypal-Plus-Integration Guide, i should not provide any personal Data in the Create-Payment-Call. For this i should do an Update-Payment-Call.

But how do I know, that the User has clicked an Paypal-Payment-Option within the Paypal-Iframe? If i configure some third-party-payments, i can define a callback. But there is no callback, if the user selects a paypal-payment-method. So, after the user has clicked on the external continue-Button, the user is directly redirected to the paypal-hosted pages, and i got no chance to proceed the Update-Call ("Patch"-Request, to add the Billing-Adress to the paypal payment session, for e.g.).

Can somebody help me?

I read the manual a lot of times and googled, viewed some yt-videos .. but, it seems, that i did not understand the flow.. ;-)

What is your exact flow, if you use Paypal-Plus and their Iframe Payment-Wall...?

4

1 回答 1

0

我也为这个问题而苦苦挣扎,我现在在初始请求之后通过 curl 补丁请求解决了这个问题。如果这是第三方付款方式的问题,我实际上不知道。如果这将以相同的方式工作,我将在未来看看。实际上,我很满意 paypal plus 正在使用 payer_info。

$ch = curl_init($paypalUrl.'/v1/payments/payment/'.$paymentID);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Authorization: Bearer '.$json->access_token
));

$data =
'[{
    "op": "add",
    "path": "/payer/payer_info",
    "value": {
        "first_name": "Max",
        "last_name": "Mustermann",
        "email": "max@mustermann.com",
        "billing_address": {
            "line1": "Lieferstr. 1",
            "city": "Berlin",
            "country_code": "DE",
            "postal_code": "12345"
        }
    }
}]';

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

$result = curl_exec($ch);
$jsonResult = json_decode($result);

curl_close($ch);

另一个想法是在站点之间使用自己的站点,例如第 23 页上提到的“继续”按钮nextpage.phpon window.location。并在这里调用补丁请求。希望它可以帮助某人!

干杯

于 2021-03-14T00:46:33.127 回答