1
votes

I am using paypal adaptive payments for my website. I have many sellers and different products. when I am as a user try to buy any product from my website then I can't see product name in Paypal form summary instead there is the name and surname of the seller.

Let me know please which parameter is being used to Pass product name ..

Here is the screenshot

enter image description here

3
Please show a sample of your code showing what you are passing to PayPal (remove anything secure).Kevin Nagurski

3 Answers

1
votes

With Adaptive Payments you can't send itemized details in the Pay request itself. Instead, you have to call Pay like usual, but then follow that up with a call to SetPaymentOptions. With that you'll pass in the PayKey you get back from the Pay request, and then you can setup all the additional details like itemized info that SetPaymentsOptions provides.

Then you would redirect to PayPal after that, and it should show you what you're after.

1
votes

With Adaptive Payments, the item details you set with SetPaymentOptions are only displayed to the customer via Embedded flow. The Embedded flow uses either a lightbox or a minibrowser for the checkout pages.

Here’s a technical instruction on how to implement the embedded flow in your front-end page, https://developer.paypal.com/docs/classic/adaptive-payments/ht_ap-embeddedPayment-curl-etc/

0
votes

I am having the same issue. It looks like it works only in an Embedded Payment Flow.

Embedded Payment Flow Using Adaptive Payments

    $receiverOptions = new PayPal\Types\AP\ReceiverOptions();
    $setPaymentOptionsRequest->receiverOptions[] = $receiverOptions;

    $receiverOptions->description = 'Description';

    $invoiceItems = array();
    $item = new PayPal\Types\AP\InvoiceItem();

    $item->name = 'Item Name'; 
    $item->price = 10;
    $item->itemPrice = 10;
    $item->itemCount = 1;

    $invoiceItems[] = $item;

    $receiverOptions->invoiceData = new PayPal\Types\AP\InvoiceData();
    $receiverOptions->invoiceData->item = $invoiceItems;

    $receiverId = new PayPal\Types\AP\ReceiverIdentifier(); 
    $receiverId->email = '[email protected]';//Change it
    $receiverOptions->receiver = $receiverId;


    $setPaymentOptionsRequest->payKey = $_POST['payKey'];

        $servicePaymentOptions = new PayPal\Service\AdaptivePaymentsService($config);
        try {
            /* wrap API method calls on the service object with a try catch */
            $responsePaymentOptions = $servicePaymentOptions->SetPaymentOptions($setPaymentOptionsRequest);

            print_r($responsePaymentOptions); die;
        } catch(Exception $ex) {
            //error
        }

        if (isset($responsePaymentOptions) && $responsePaymentOptions->responseEnvelope->ack == "Success")
        {
            //Success
        }