Hi, I want to add coupon code in the following function of a payment plugin to be sent to the payment processor: public function _process(Invoice $invoice, Am_Request $request, Am_Paysystem_Result $result) { $a = new Am_Paysystem_Action_Form((($this->getConfig('testing') == self::MODE_SANDBOX) ? self::TESTING_URL : self::URL)); $a->contractId = $invoice->getItem(0)->getBillingPlanData("bluesnap_contract_id"); $a->custom1 = $invoice->public_id; $a->member_id = $invoice->user_id; $a->currency = strtoupper($invoice->currency); $a->firstName = $invoice->getFirstName(); $a->lastName = $invoice->getLastName(); $a->email = $invoice->getEmail(); $a->overridePrice = sprintf("%.2f", $invoice->first_total); $a->overrideRecurringPrice = sprintf("%.2f", $invoice->second_total); if ($this->getConfig('testing') == self::MODE_TEST) { $a->testMode = Y; } $a->filterEmpty(); $result->setAction($a); } It does not accept $a->couponcode = $invoice->getCouponCode(); Thank you for any help.
Yes, bluesnap accepts the parameter "couponcode". I wish amember developers could improve the Bluesnap plugin so that you do not need to add products with fixed prices to bluesnap catalog but use it as a payment processing system only. This allows full control of pricing/discounts with aMember. I am quoting from their documentation: "The Hosted Payment Page is designed for businesses that manage their product catalogs in a system outside of BlueSnap and just need a checkout page where payments will be processed by BlueSnap." https://support.bluesnap.com/docs/intro-to-buynow-hosted-payments-page