/** * The WebPayAdmin::deliverOrderRows entrypoint method is used to deliver individual order rows. Supports invoice and card orders. * (To partially deliver PaymentPlan or Direct Bank orders, please contact Svea.) * * For Invoice orders, the order row status is updated at Svea following each successful request. * * For card orders, an order can only be delivered once, and any non-delivered order rows will be cancelled (i.e. the order amount * will be lowered by the sum of the non-delivered order rows). A delivered card order has status CONFIRMED at Svea. * * Get an order builder instance using the WebPayAdmin::deliverOrderRows() entrypoint, then provide more information about the * transaction and send the request using the DeliverOrderRowsBuilder methods: * * Use setRowToDeliver() or setRowsToDeliver() to specify the order row(s) to deliver. The order row indexes should correspond to * those returned by i.e. WebPayAdmin::queryOrder(); * * For card orders, use addNumberedOrderRow() or addNumberedOrderRows() to pass in a copy of the original order rows. The original * order rows can be retrieved using WebPayAdmin::queryOrder(); the numberedOrderRows attribute contains the serverside order rows * w/indexes. Note that if a card order has been modified (i.e. rows cancelled or credited) after the initial order creation, the * returned order rows will not be accurate. * ... * $request = WebPayAdmin::deliverOrderRows($config) * ->setOrderId() // required * ->setTransactionId() // optional, card only, alias for setOrderId * ->setCountryCode() // required * ->setInvoiceDistributionType() // required, invoice only * ->setRowToDeliver() // required, index of original order rows you wish to cancel * ->addNumberedOrderRow() // required for card orders, should match original row indexes * ; * // then select the corresponding request class and send request * $response = $request->deliverInvoiceOrderRows()->doRequest(); // returns DeliverOrderRowsResponse * $response = $request->deliverPaymentPlanOrderRows()->doRequest(); // returns DeliverOrderRowsResponse * $response = $request->deliverCardOrderRows()->doRequest(); // returns ConfirmTransactionResponse * ... * * @see \Svea\DeliverOrderRowsBuilder \Svea\DeliverOrderRowsBuilder * @see \Svea\AdminService\DeliverOrderRowsResponse \Svea\AdminService\DeliverOrderRowsResponse * @see \Svea\HostedService\ConfirmTransactionResponse \Svea\HostedService\ConfirmTransactionResponse * * @param ConfigurationProvider $config instance implementing ConfigurationProvider * @return Svea\DeliverOrderRowsBuilder * @throws Svea\ValidationException */ public static function deliverOrderRows($config = NULL) { if ($config == NULL) { WebPay::throwMissingConfigException(); } return new Svea\DeliverOrderRowsBuilder($config); }
/** * The WebPay::listPaymentMethods method is used to fetch all available paymentmethods configured for a given country. * * Use the WebPay::listPaymentMethods() entrypoint to get an instance of * ListPaymentMethods. Then provide more information about the transaction and * send the request using ListPaymentMethod methods. * * $methods = WebPay::listPaymentMethods( $config ) * ->setCountryCode("SE") // required * ->doRequest(); * * Following the ->doRequest call you receive an instance of ListPaymentMethodsResponse. * * @see \Svea\HostedService\ListPaymentMethods \Svea\HostedService\ListPaymentMethods * @see \Svea\HostedService\ListPaymentMethodsResponse \Svea\HostedService\ListPaymentMethodsResponse * * @param ConfigurationProvider $config * @return Svea\HostedService\ListPaymentMethods * @throws \Svea\ValidationException */ static function listPaymentMethods($config) { if ($config == NULL) { WebPay::throwMissingConfigException(); } return new Svea\HostedService\ListPaymentMethods($config); }