Skip to content

Conversation

@Serfe-com
Copy link

This MR fixes the issue that prevents the CC payment on sale receipt conversion which triggers #275.

Use SalesReceiptCCPayment instead of CreditCardPayment to avoid the mapping.

To make this work use the following structure:

$salesReceiptObj = SalesReceipt::create([
            "CustomerRef" => [
                "value" => $customerRequestObj->Id,
            ],
            "BillEmail" => [
                "Address" => $billingEmail,
            ],
            "Line" => [[
                "Id" => "1",
                "LineNum" => 1,
                "Description" => "Pest Control Services",
                "Amount" => 35.0,
                "DetailType" => "SalesItemLineDetail",
                "SalesItemLineDetail" => [
                    "ItemRef" => [
                        "value" => "1",
                        "name" => "Pest Control",
                    ],
                    "UnitPrice" => 35,
                    "Qty" => 1,
                    "TaxCodeRef" => [
                        "value" => "NON",
                    ],
                ],
            ]],
            "PaymentType" => "CreditCard",
            "SalesReceiptCCPayment" => [
                "CreditChargeInfo" => [
                    "ProcessPayment" => true,
                ],
                "CreditChargeResponse" => [
                    "CCTransId" => "E2XT5I2FFZGS"
                ]
            ],
            "TxnSource" => "IntuitPayment",
        ]);

We avoid the mapping from CreditCardPayment to BillPaymentCreditCard with this.

We don't know if removing the mapping might affect this, so we added this to conserve backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant